import sqlite3
#with sqlite3.connect('SQLiteTest.db') as conn:
#    with conn.cursor() as cursor:
conn=sqlite3.connect('SQLiteTest.db')
#try:    
#    cursor=conn.cursor()
#    cursor.execute('create table user (id int primary key,name varchar(20))')
#    cursor.execute('insert into user (id,name) values(?,?)',(1,'lcz'))
#    print(cursor.rowcount)
#    cursor.close()
#    conn.commit()
#    conn.close()
#except TypeError as t:
#    print(t)
#finally:
#    conn.close()

try:
    c=conn.cursor()
    c.execute('select * from user where id=?',(1,))
    values=c.fetchall()
    print(values)
except TypeError as t:
    print(t)
finally:
    conn.close()